package com.zzj.ecology.admin.controller.minitor;

import com.zzj.ecology.admin.controller.BaseController;
import com.zzj.ecology.common.constant.UrlConstants;
import com.zzj.ecology.framework.web.domain.Server;
import com.zzj.ecology.system.dto.HttpResult;
import com.zzj.ecology.system.dto.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//https://blog.csdn.net/u013019701/article/details/80727946
@Api(value = "SysService", description = "SysService 服务器硬件信息")
@RestController
public class SysServiceController extends BaseController {

    @ApiOperation(value = "获取服务器硬件信息", notes = "获取服务器硬件信息，CPU/内存/硬盘等信息", httpMethod = "GET")
    @RequestMapping(value = UrlConstants.ServerUrl.SERVER_INFO)
    public R getServiceInfo() throws Exception {
        Server server = new Server();
        server.copyTo();
        return R.ok().setData(server);
    }

}
